//员工管理
App.util.ns('Client.Staff');
Client.Staff.Conf = {
    columns: [
        {name: '姓名', value: 'nickname'},
        {name: '手机号', width: '120px',value: 'phone'},
//        {name: '性别', width: '80px',value: function(item){
//            switch (item.gender+'') {
//                case '0':
//                    return '未知';
//                case '1':
//                    return '男';
//                case '2':
//                    return '女';
//            }
//        }},
        {name: '状态', width: '80px',value: function(item){
            switch (item.client_bind_status+'') {
                case '0':
                    return '未绑定';
                case '1':
                    return '待审核';
                case '2':
                    return '审核通过';
                case '3':
                    return '审核未通过';
            }
        }},
        {name: '创建日期', width: '80px', value: function(item){
            return App.util.formator.date(item.created_at);
        }}
    ],
    form: [
        {type: 'hidden', name: 'id'},
        {type: 'input', name: 'nickname', title: '姓名', required: true, maxLength: 40, rule: {
            type: 'str',
            range: [1, 40]
        }},
        {type: 'input', name: 'phone', title: '手机号', required: true, rule: {type: 'phone'}},
        {type: 'radio', name: 'gender', title: '性别', 
            items: [
                ['0', '未知'],
                ['1', '男'],
                ['2', '女']
            ], 
            defaults: '0'
        },
        {type: 'img', name: 'icon', title: '头像',rule: {
            type: 'str',
            range: [0, 255]
        }},
        {type: 'textarea', name: 'introduction', title: '简介', maxLength: 2000, rule: {
            type: 'str',
            range: [0, 2000]
        }}
    ]
};